
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Home</title>
    <link th:href="@{/css/bootstrap/3.3.6/bootstrap.css}" rel='stylesheet' type='text/css' />

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <!-- Custom Theme files -->
    <link th:href="@{/css/style.css}" rel='stylesheet' type='text/css' />
    <!-- Custom Theme files -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Hotel Deluxe Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
    <!--webfont-->
    <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    <script type="text/javascript" th:src="@{/js/jquery-1.11.1.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/login.js}"></script>
    <script th:src="@{/js/jquery.easydropdown.js}"></script>
    <!--Animation-->
    <script th:src="@{/js/wow.min.js}"></script>
    <link th:href="@{/css/animate.css}" rel='stylesheet' type='text/css' />
    <link rel="stylesheet" th:href="@{/css/AdminLTE.min.css}">
    <link rel="stylesheet" th:href="@{/css/skins/_all-skins.min.css}">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
    <script>
        new WOW().init();
    </script>
</head>
<body>
<div class="header">
    <div class="col-sm-8 header-left">
        <div class="logo">
            <a th:href="@{/user/toIndex}"><img th:src="@{/images/hotel/logo.png}" alt=""/></a>
        </div>
        <div class="menu">
            <a class="toggleMenu" href="#"><img th:src="@{/images/hotel/nav.png}" alt="" /></a>
            <ul class="nav" id="nav">
                <li class="active"><a th:href="@{/user/toIndex}">主页</a></li>
                <li><a th:href="@{/user/toRooms}">房间</a></li>
                <li><a href="news.html">最近活动</a></li>
                <li><a th:href="@{/user/toGallery}">酒店</a></li>
                <li><a th:href="@{/user/userCenter}">个人中心</a></li>
                <div class="clearfix"></div>
            </ul>
            <script type="text/javascript" th:src="@{/js/responsive-nav.js}"></script>
        </div>
        <!-- start search-->
        <div class="search-box">
            <div id="sb-search" class="sb-search">
                <form>
                    <input class="sb-search-input" placeholder="Enter your search term..." type="search" name="search" id="search">
                    <input class="sb-search-submit" type="submit" value="">
                    <span class="sb-icon-search"> </span>
                </form>
            </div>
        </div>
        <!----search-scripts---->
        <script th:src="@{/js/classie.js}"></script>
        <script th:src="@{/js/uisearch.js}"></script>
        <script>
            new UISearch( document.getElementById( 'sb-search' ) );
        </script>
        <!----//search-scripts---->
        <div class="clearfix"></div>
    </div>
    <div class="col-sm-4 header_right">
        <div id="loginContainer">
            <a href="#" id="loginButton"><img th:src="@{/images/hotel/login.png}">
                <span th:if="${session.person != null}" id="logins" th:value="${session.person}" th:text="${session.person.userName}"></span>
                <span th:if="${session.person == null}">登  录</span>
            </a>

            <div id="registBox">
                <a th:href="@{/pages/toRegist}" id="registButton">
                    <span th:if="${session.person == null}">注  册</span>
                    <span th:if="${session.person != null}" ></span>
                </a>
                <a th:href="@{/user/logout}" id="logoutButton">
                    <span th:if="${session.person != null}">退  出</span>
                    <span th:if="${session.person == null}" ></span>
                </a>
            </div>



            <div id="loginBox">
                <form th:action="@{/user/welcome}" id="loginForm" th:method="POST">
                    <fieldset id="body">
                        <fieldset>
                            <label for="name">用户名</label>
                            <input type="text" name="userName" id="name">
                        </fieldset>
                        <fieldset>
                            <label for="password">密码</label>
                            <input type="password" name="userPassword" id="password">
                        </fieldset>
                        <input type="submit" id="login" value="登录">
                        <label for="checkbox"><input type="checkbox" id="checkbox"> <i>记住我</i></label>
                    </fieldset>
                    <span><a href="#">忘记您的密码了？</a></span>
                </form>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <div class="clearfix"></div>
</div>
<div class="banner">
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">用户中心</h3>
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap"><div class="row"><div class="col-sm-6"></div><div class="col-sm-6"></div></div><div class="row"><div class="col-sm-12">
                            <div style="text-align: center;" >
                                <form th:action="@{/user/check}" >
                                    <input name="check" class="form-control" placeholder="Search...">

                                    <input type="submit" class="btn btn-flat" value="搜索"></input>
                                </form>
                            </div>



                            <table id="example2" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="example2_info">
                                <thead>
                                <tr role="row">
                                    <th class="sorting_asc" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">用户ID</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">订单ID</th>
                                    <!--<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">订单ID</th>-->
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">订单内容</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">订单支付状态</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">支付金额</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">发票类型</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">订单状态</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">下单时间</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">预计入住时间</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">房间ID</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">酒店ID</th>
                                    <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">用户电话</th>
                                </tr>
                                </thead>
                                <tbody th:each="order:${order}" class="text-center" style="height: 40px">
                                <tr role="row" class="odd">
                                    <td><span th:text="${order.uId}"></span></td>
                                    <td><span th:text="${order.orderId}"></span></td>
                                    <td><span th:text="${order.orderDesc}"></span></td>
                                    <td><span th:text="${order.orderPayStatus}"></span></td>
                                    <td><span th:text="${order.orderPayment}"></span></td>
                                    <td><span th:text="${order.invoiceType}"></span></td>
                                    <td><span th:text="${order.orderStatus}"></span></td>
                                    <td><span th:text="${#dates.format(order.orderReserve, 'yyyy-MM-dd hh:mm:ss')}"></span></td>
                                    <td><span th:text="${#dates.format(order.orderInTime, 'yyyy-MM-dd hh:mm:ss')}"></span></td>

                                    <td><span th:text="${order.rId}"></span></td>
                                    <td><span th:text="${order.hId}"></span></td>
                                    <td><span th:text="${order.uPhone}"></span></td>

                                </tr>
                                </tbody>
                                <!--<tfoot>-->
                                <!--<tr><th rowspan="1" colspan="1">用户ID</th><th rowspan="1" colspan="1">用户姓名</th><th rowspan="1" colspan="1">用户电话</th><th rowspan="1" colspan="1">用户邮箱</th></tr>-->
                                <!--</tfoot>-->
                            </table>
                            <br>
                            <div style="text-align: center;">
                                <form action="/user/userCenter">
                                    <button class="btn btn-primary">返回</button>
                                </form>
                            </div>

                            <!-- /.box-body -->
                        </div>
                        </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>
<div class="control-sidebar-bg"></div>
</div>

<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/bootstrap/dist/js/bootstrap.min.js}"></script>
<script th:src="@{/datatables.net/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/datatables.net-bs/js/dataTables.bootstrap.min.js}"></script>
<script th:src="@{/js/jquery-slimscroll/jquery.slimscroll.min.js}"></script>
<script th:src="@{/fastclick/lib/fastclick.js}"></script>
<script th:src="@{/bootstrap/dist/js/adminlte.min.js}"></script>
<script th:src="@{/bootstrap/dist/js/demo.js}"></script>

<script>
    $(function () {
        $('#example1').DataTable()
        $('#example2').DataTable({
            'paging'      : true,
            'lengthChange': false,
            'searching'   : false,
            'ordering'    : true,
            'info'        : true,
            'autoWidth'   : false
        })
    })
</script>
</div>

<div class="content_middle">
    <div class="container">

        <div class="offering">
            <h2>What can Hotel Deluxe offer to you ?</h2>
            <h3>Ut wisi enim ad minim veniam, quis</h3>
            <ul class="icons wow fadeInUp" data-wow-delay="0.4s">
                <li><i class="icon1"> </i><span class="one"> </span></li>
                <li><i class="icon2"> </i><span class="two"> </span></li>
                <li><i class="icon3"> </i><span class="three"> </span></li>
                <li><i class="icon4"> </i><span class="four"> </span></li>
                <li><i class="icon5"> </i></li>
            </ul>
            <div class="real">
                <h4>Reality</h4>
                <div class="col-sm-6">
                    <ul class="service_grid">
                        <i class="s1"> </i>
                        <li class="desc1 wow fadeInRight" data-wow-delay="0.4s">
                            <p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod maxim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum</p>
                        </li>
                        <div class="clearfix"> </div>
                    </ul>
                </div>
                <div class="col-sm-6">
                    <ul class="service_grid">
                        <i class="s2"> </i>
                        <li class="desc1 wow fadeInRight" data-wow-delay="0.4s">
                            <p>Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod maxim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum</p>
                        </li>
                        <div class="clearfix"> </div>
                    </ul>
                </div>
                <div class="clearfix"> </div>
            </div>
        </div>
    </div>
</div>
</div>
<div class="footer">
    <div class="container">
        <div class="footer_top">
            <h3>Subscribe to our newsletter</h3>
            <form>
        <span>
            <i><img th:src="@{/images/hotel/mail.png}" alt=""></i>
            <input type="text" value="Enter your email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Enter your email';}">
            <label class="btn1 btn2 btn-2 btn-2g"> <input name="submit" type="submit" id="submit1" value="Subscribe"> </label>
            <div class="clearfix"> </div>
        </span>
            </form>
        </div>
        <div class="footer_grids">
            <div class="footer-grid">
                <h4>Ipsum Quis</h4>
                <ul class="list1">
                    <li><a href="contact.html">Contact</a></li>
                    <li><a href="#">Mirum est</a></li>
                    <li><a href="#">Placerat facer</a></li>
                    <li><a href="#">Claritatem</a></li>
                    <li><a href="#">Sollemnes </a></li>
                </ul>
            </div>
            <div class="footer-grid">
                <h4>Quis Ipsum</h4>
                <ul class="list1">
                    <li><a href="#">Placerat facer</a></li>
                    <li><a href="#">Claritatem</a></li>
                    <li><a href="#">Sollemnes </a></li>
                    <li><a href="#">Claritas</a></li>
                    <li><a href="#">Mirum est</a></li>
                </ul>
            </div>
            <div class="footer-grid last_grid">
                <h4>Follow Us</h4>
                <ul class="footer_social wow fadeInLeft" data-wow-delay="0.4s">
                    <li><a href=""> <i class="fb"> </i> </a></li>
                    <li><a href=""><i class="tw"> </i> </a></li>
                    <li><a href=""><i class="google"> </i> </a></li>
                    <li><a href=""><i class="u_tube"> </i> </a></li>
                </ul>
            </div>
            <div class="clearfix"> </div>
        </div>
    </div>
</div>
</body>

<script>
    $(function () {
        // $("#login").click(function (data) {
        //     var name = $("#name").val();
        //     var pwd = $("#password").val();
        //     $.ajax({
        //         url:'/user/welcome',
        //         method:'POST',
        //         data:{
        //             'userName':name,
        //             'userPassword':pwd
        //         },
        //
        //         success:function (text) {
        //             if (text.code>0){
        //                 alert("登陆成功！");
        //             }else {
        //                 alert("用户名或密码不正确");
        //             }
        //         },
        //         error:function () {
        //             alert("ERROR!");
        //         }
        //     })
        // })

        $('#loginButton').click(function () {
            var test = $('#logins').val();
            if(test!=null){
                $('#loginBox').remove();
            }
        })

    })
</script>


</html>